package com.wms.controller;


import com.wms.common.Result;
import com.wms.entity.Company;
import com.wms.entity.Fees;
import com.wms.service.FeesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 林鸿宇
 * @since 2024-06-30
 */
@RestController
@RequestMapping("/fees")
public class FeesController {
    @Autowired
    private FeesService feesService;
    @GetMapping("/list")
    public Result<List<Fees>> list() {
        List<Fees> fees = feesService.list();
        System.out.println("Retrieved Companies: " + fees);
        return Result.suc("获取成功", fees);
    }

    @DeleteMapping("/delete/{id}")
    public boolean delete(@PathVariable Integer id) {
        return feesService.removeById(id);
    }
}
